package com.ruoyi.auth.data;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.auth.constant.UnifiedAuthenticationConstants;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class BizContentParameter  implements Serializable {
    private static final long serialVersionUID = 1L;

    private final String appMark;
    private final Map<String, String> params;

    public BizContentParameter(String appMark,  Map<String, String> params) {
        this.appMark = appMark;
        this.params = params;
    }

    @Override
    public String toString() {
        Map<String, String> map = new HashMap<>(2);
        map.put(UnifiedAuthenticationConstants.BizContentJsonKey.appId, this.appMark);
        map.put(UnifiedAuthenticationConstants.BizContentJsonKey.params, JSONUtil.toJsonStr(this.params));
        return JSON.toJSONString(map);
    }
}
